Skip to content

Release Vale 3.27.0 - #703

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
vendor/vale/upgrade
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
vendor/vale/upgrade

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The @taskless/vale-* packages are published ahead of what
@taskless/cli pins.

This moves all six pins from 3.26.0-20261102164455 to
3.27.0-20261117230017 — Vale 3.27.0 — and regenerates
pnpm-lock.yaml. The pins move together on purpose: the platform
packages are selected by optional dependency, so a straggler left at
the old version is a different Vale on one platform than on the others.

It also moves VALE_VERSION in capabilities.ts to
3.27.0 and regenerates src/generated/vale-vocabulary.ts
from the new binary, and the workflow ran
engine-version-consistency against the result before pushing. What
this does not carry is judgment: if the contract suites below
report a failure, Vale 3.27.0 changed a measured behaviour,
and that edit, the update ledger, any migration, and the release
note's prose belong in a child pull request. So does a row for each
format reader listed below.

This is the half that reaches a user. Republishing the platform
packages changes nobody's install, because the CLI pins each one
exactly; merging this is what ships the new Vale.

This pull request rolls: if another set is published before it merges,
the branch, title, and body are rewritten to the newer version rather
than a second pull request being opened. Push a commit to the branch
and that stops — the workflow will not force-push over a commit it did
not write.

Measured against Vale 3.27.0

Compared with 3.26.0, which is what main pins. Validate on a pull request this workflow opens waits for a maintainer to approve it, so this section is the check that ran.

Contract suites

6 of 226 failed. The new Vale changed a recorded behaviour. The measured edit, the update ledger, and any migration belong in a child pull request that merges down into this branch.

vale-vendor-contract.test.ts > Vale vendor contract Vale 3.23.0 a comment addressed to a tool is not read drops a Go //nolint line
  AssertionError: expected [ 1, 2 ] to deeply equal [ 2 ]
vale-vendor-contract.test.ts > Vale vendor contract Vale 3.23.0 a comment addressed to a tool is not read drops a Python # noqa line
  AssertionError: expected [ 1, 2 ] to deeply equal [ 2 ]
vale-vendor-contract.test.ts > Vale vendor contract Vale 3.23.0 a comment addressed to a tool is not read drops a JavaScript eslint-disable line
  AssertionError: expected [ 1, 2 ] to deeply equal [ 2 ]
vale-vendor-contract.test.ts > Vale vendor contract Vale 3.23.0 does not read a docstring's :param: field as prose
  AssertionError: expected [ 2, 4 ] to deeply equal [ 2 ]
vale-vendor-contract.test.ts > Vale vendor contract Vale 3.24.0 drops a C# ReSharper or NOSONAR comment
  AssertionError: expected [ 1, 2, 3 ] to deeply equal [ 3 ]
vale-vendor-contract.test.ts > Vale engine capabilities lints comment text but not the code body in .css
  AssertionError: .css did not lint its comment text: expected [] to have a length of 1 but got +0

Format readers upstream added

  • internal/lint/code/tsw/errors.go
  • internal/lint/code/tsw/node.go
  • internal/lint/code/tsw/query.go
  • internal/lint/code/tsw/stub.go
  • internal/lint/code/tsw/tsw.go

Each can route an extension that VALE_FORMAT_TIERS in capabilities.ts has no row for, and an unlisted extension is never probed. Find where internal/core/format.go sends it, probe the extension against the new binary, and add a row. A reader that needs an external converter is the dangerous case: the missing row becomes a crash that aborts every Vale rule in the run. A file whose first line is //go:build js belongs to the WebAssembly build only, and the CLI never reaches it. (diff)

Extension routing (internal/core/format.go)

Changed. An extension added to FormatByExtension is a format Vale learned, even when no reader file was added. Probe each one against the new binary and add a row to VALE_FORMAT_TIERS.

@@ -38,6 +38,10 @@ func IsTestFile(name string) bool {
 //
 // Only Clojure (no bundled grammar uses `;` comments) and PowerShell (a
 // stand-in grammar would lose `<# #>` block interiors) remain here.
+// CommentsByNormedExt is how each code format's comments are found when
+// its tree-sitter grammar is not installed: the pattern of a line comment,
+// and of a block comment's first and last lines. `$^` matches nothing, for
+// a form the language lacks.
 var CommentsByNormedExt = map[string]map[string]string{
 	".clj": {
 		"inline":     `(;+.+)`,
@@ -49,8 +53,70 @@ var CommentsByNormedExt = map[string]map[string]string{
 		"blockStart": `(<#.*)`,
 		"blockEnd":   `(.*#>)`,
 	},
+	".c":     cStyleComments,
+	".cpp":   cStyleComments,
+	".cs":    cStyleComments,
+	".go":    cStyleComments,
+	".java":  cStyleComments,
+	".js":    cStyleComments,
+	".kt":    cStyleComments,
+	".proto": cStyleComments,
+	".qml":   cStyleComments,
+	".rs":    cStyleComments,
+	".ts":    cStyleComments,
+	".css": {
+		"inline":     `$^`,
+		"blockStart": `(/\*.*)`,
+		"blockEnd":   `(.*\*/)`,
+	},
+	".php": {
+		"inline":     `((?://|#).+)`,
+		"blockStart": `(/\*.*)`,
+		"blockEnd":   `(.*\*/)`,
+	},
+	".ex": hashComments,
+	".r":  hashComments,
+	".py": {
+		"inline":     `(#.+)`,
+		"blockStart": `(^\s*["']{3}.*)`,
+		"blockEnd":   `(.*["']{3}\s*$)`,
+	},
+	".rb": {
+		"inline":     `(#.+)`,
+		"blockStart": `(^=begin.*)`,
+		"blockEnd":   `(^=end.*)`,
+	},
+	".jl": {
+		"inline":     `(#.+)`,
+		"blockStart": `(#=.*)`,
+		"blockEnd":   `(.*=#)`,
+	},
+	".lua": {
+		"inline":     `(--.+)`,
+		"blockStart": `(--\[\[.*)`,
+		"blockEnd":   `(.*\]\])`,
+	},
+	".hs": {
+		"inline":     `(--.+)`,
+		"blockStart": `(\{-.*)`,
+		"blockEnd":   `(.*-\})`,
+	},
 }
 
+// cStyleComments and hashComments are the two shapes most languages share.
+var (
+	cStyleComments = map[string]string{
+		"inline":     `(//.+)`,
+		"blockStart": `(/\*.*)`,
+		"blockEnd":   `(.*\*/)`,
+	}
+	hashComments = map[string]string{
+		"inline":     `(#.+)`,
+		"blockStart": `$^`,
+		"blockEnd":   `$^`,
+	}
+)
+
 // FormatByExtension associates a file extension with its "normed" extension
 // and its format (markup, code or text).
 var FormatByExtension = map[string][]string{

Upstream release notes — 3.27.0

https://github.com/vale-cli/vale/releases/tag/v3.27.0

French, German, and Spanish

Vale now lints French, German, and Spanish in the language itself. Set Lang and run vale sync to download its model:

[*.md]
Lang = fr

Sentences are split and words are tagged with a model for that language, so sequence rules can match on upos: tags. spelling reads the language's own dictionary from config/dictionaries, and sentence-case rules keep the words the language capitalizes, such as German nouns. More languages are available; vale sync reports any that have no model.

Source-code grammars

Tree-sitter grammars are now WebAssembly modules that vale sync installs, and the release binaries no longer need CGo.

If you lint source code, run vale sync after upgrading. A [*.go] section gets the Go grammar automatically; Grammars = go, python (or ALL, or NONE) overrides that.

Also

  • vale ls-metrics takes several paths or a directory.
  • Rules scoped to sentence or paragraph now run on code comments.
  • A hard line break no longer joins a nested list to the item above it (#1225).

Changelog

  • 4ce91ef2 fix: Ignore the zig cache"
  • de2efa27 fix: Name the dictionary directory the same way everywhere
  • 05abbafb fix: let a hard line break keep a nested list separate (#1226)
  • 916d7b41 fix: Run sentence-scoped rules on code comments
  • ad4b34e2 feat: The English-built checks follow Lang
  • 80b2ac8a fix: Lang in [*], and a grammar the cache can't take
  • 39454242 feat: Sync the grammars the sections imply
  • b2d7c28a chore: Bump prose to v3.3.0
  • 7efb3942 feat: A vale_nocode build without the grammar runtime
  • 66bbb85a ci: Put DITA-OT on the Windows PATH
  • 49bd113b chore: Pin prose to the branch head
  • aa756dab chore: Bump prose for the new English tagger
  • 466210d2 fix: Download the grammar sources before building
  • 0c03fed1 feat: Run tree-sitter grammars as WebAssembly
  • cb0fdf54 feat: Run tree-sitter grammars as WebAssembly
  • de56bd44 chore: Build with Go 1.27.3
  • 7d7de145 feat: Let ls-metrics take several paths
  • 04b464cf fix: Give Asciidoctor.js a JavaScript converter
  • f0b930c0 feat: Download language models on sync
  • 3385243d feat: Lint a file in the language its configuration names
  • 628a7877 chore: Bump prose
  • e6c7f754 test: Correct three expected alert positions
  • 0d9e8023 fix: A match in text the converter rewrote is placed where it is
  • 9b7e4caa fix: An undefined Sphinx substitution is skipped, not read as prose
  • 9e606e9a fix: A sentence-case rule accepts an acronym

@github-actions github-actions Bot added automated Opened and maintained by a workflow, not a person. Read the PR body for what to do with it. vale-upgrade Vale pin bump from vale-upgrade.yml. A rolling PR: each release rewrites it. labels Nov 17, 2026
@github-actions
github-actions Bot force-pushed the vendor/vale/upgrade branch from 764cbbc to 8bd0c25 Compare November 18, 2026 07:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Opened and maintained by a workflow, not a person. Read the PR body for what to do with it. vale-upgrade Vale pin bump from vale-upgrade.yml. A rolling PR: each release rewrites it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants